<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ include file="/WEB-INF/view/common/includes.jsp" %>
<%@ include file="/WEB-INF/view/inc.jsp" %>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<style>
    .panel-body {
        border-bottom-width: 0px;
        border-left-width: 0px;
    }

    .layout-expand .panel-header {
        border-width: 0px;
    }

</style>
<body class="easyui-layout" data-options="fit:true,border:false">
<!-- 搜索框 -->
<div data-options="region:'north',title:'查询条件',border:false"  class="north_form_1">
    <form id="searchForm">
        <div class="fitem fl">
            <label>标题:</label>
            <input name="title" class="easyui-textbox">
        </div>
        <div class="fitem searchItem fr">
            <a class="easyui-linkbutton" iconCls="icon-search" onclick="sy_searchFun()">搜索</a>
            <a class="easyui-linkbutton" iconCls="icon-reload" onclick="sy_resetFun()">重置</a>
        </div>
    </form>
</div>
<div data-options="region:'center',border:false">
    <table id="grid" class="easyui-datagrid" fit="true"
           data-options="url: '<%=contextPath%>/goodsInfo/list',method: 'post',pagination: true,rownumbers:true,idField: 'id', fitColumns:true,singleSelect:true,striped:true,sortName:'createTime',sortOrder:'desc',toolbar: '#toolbar'">
        <thead>
        <tr>
            <th data-options="field:'title'" width="150" sortable="true">标题</th>
            <th data-options="field:'goodsTypeId',formatter:sy_other_goodsType" width="150" sortable="true">商品分类</th>
            <th data-options="field:'price'" width="60" sortable="true">原价</th>
            <th data-options="field:'currentPrice'" width="60" sortable="true">优惠价</th>
            <th data-options="field:'discount'" width="60" sortable="true">折扣</th>
            <th data-options="field:'validityDate'" width="100" sortable="true">保质期</th>
            <th data-options="field:'stock'" width="100" sortable="true">库存</th>
            <th data-options="field:'isPost',dictionary:'isPost',formatter:sy_dict"  width="100" sortable="true">是否包邮</th>
            <th data-options="field:'description'" width="400" sortable="true">商品描述</th>
        </tr>
        </thead>
    </table>
</div>
<!-- 按钮-->
<div id="toolbar" style="display: none;">
    <t:button action="goodsInfo_add" iconCls="icon-add" buttonName="新增" onclick="sy_addFun('/goodsInfo/toSaveAndUpdate/','添加商品详情信息',600)"/>
    <t:button action="goodsInfo_edit" iconCls="icon-edit" buttonName="编辑" onclick="sy_editFun('/goodsInfo/toSaveAndUpdate/','修改商品详情信息',600)"/>
    <t:button action="goodsInfo_remove" iconCls="icon-remove" buttonName="删除" onclick="sy_removeGridFun_tip('/goodsInfo/delete')"/>
</div>
<script>
    //商品类型
    var sy_other_goodsType = function(value, row, index) {
        var url = "/goodsType/getGoodsTypeNameById";
        return sy_other(value,row,index,url);
    }
</script>
</body>
</html>



